import React, { Fragment } from 'react'
import { Breadcrumbs } from 'scd'
import Cookies from 'js-cookie';
import styles from './index.css';

function BasicLayout({ children, route, location }) {
  if(Cookies.get('token')){
    return (
        <Fragment>
            <Breadcrumbs route={route} location={location} />
            <div className={styles.normal}>
                {children}
            </div>
        </Fragment>
    );
  }
  return window.location.href = '/user-center/#/login';

}

export default BasicLayout;
